﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Logistics.Utility
{
    public class NoBuilder
    {
        static Random random = new Random();

     
        /// <summary>
        /// 生成标单号
        /// </summary>
        /// <param name="city_id"></param>
        /// <returns></returns>
        public static string GetBidNo(string city_id)
        {
            int num = DateConvert.DateTimeToStamp(DateTime.Now);
            return "A"+city_id.ToString().Substring(0, 4) + num + random.Next(100).ToString().PadLeft(2, '0');
        }

       

        /// <summary>
        /// 生成运单号
        /// </summary>
        /// <returns></returns>
        public static string GetLoadNo()
        {
            int num = DateConvert.DateTimeToStamp(DateTime.Now);
            return  DateTime.Now.ToString("yyMMddHHmm") + random.Next(100).ToString().PadLeft(2, '0');
        }
    }
}
